#pragma once

#include "opennurbs_public.h"
#include <iostream>
void TestCurve()
{
	ON_2dPoint st(100, 300);
	ON_2dPoint ed(0, 500);
	ON_Line* line = new ON_Line(st,ed);

	ON_Curve* nurbsCurve = new ON_LineCurve(*line);
	double len = 0;
	nurbsCurve->GetLength(&len);
	std::cout << len << std::endl;
	nurbsCurve->SetDomain(0, 1);
	double* v= new double[15];
	std::cout << "weidu:" << nurbsCurve->Dimension() << endl;
	std::cout << "degree:" << nurbsCurve->Degree() << endl;
	nurbsCurve->Evaluate(0.5, 0, nurbsCurve->Dimension(), v);

	for (size_t i = 0; i < 15; i++)
	{
		std::cout << *v << std:: endl;
		v++;
	}
}

void TestCircleCurve()
{
	ON_3dPoint st(0,0,0);
	double radium = 1000;
	ON_Circle* circle = new ON_Circle(st, radium);
	ON_NurbsCurve circleCurve;
	circle->GetNurbForm(circleCurve);
	std::cout << "weidu:" << circleCurve.Dimension() << endl;
	//circleCurve.;
}